package com.example.product2.controller;

import com.example.product2.service.StuService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@AllArgsConstructor
public class TestController {
    private StuService service;

    @GetMapping("/test")
    public Object test(){
        return "2";
    }

    @GetMapping("/add")
    public Object add(String name,Integer stuId,Integer mm){
        service.add(name,stuId,mm);
        return "ok";
    }
}
